﻿<?xml version="1.0" encoding="utf-8" ?>
<Form Name="Test Form" ValidationSummary="true" SuccessPage="/Pages/Success.aspx" UseDefaultStyle="true">
    <Providers>
        <Provider Type="DataStore" Name="StandardProvider" />
        <Provider Type="FileSystem" Name="StandardProvider" />
        <Provider Type="Validation" Name="StandardProvider" />
        <Provider Type="Email" Name="StandardProvider" RecipientAddress="formsy_recipient@yourdomain.com" SenderAddress="no-reply@yourdomain.com" />
    </Providers>

    <FieldSet Name="">
        <Field Name="Arbitrary Radio Button" Type="RadioButton">
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please select the arbitrary radio button" Display="Dynamic"/>
        </Field>

        <Field Name="Title" Type="RadioButtonList">
            <Items>
                <Item Text="Mr" Value="Mr" />
                <Item Text="Mrs" Value="Mrs" />
                <Item Text="Miss" Value="Miss" />
            </Items>
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please select your title" Display="Dynamic"/>
        </Field>

        <Field Name="First Name" Type="TextBox">
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please enter a first name" Display="Dynamic"/>
            <Validator Type="RegularExpressionValidator" Text="*" ErrorMessage="Please enter letters only" ValidationExpression=".*" Display="Dynamic"/>
        </Field>

        <Field Name="Last Name" Type="TextBox">
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please enter a last name" />
        </Field>


        <Field Name="Street Type" Type="DropDownList">
            <Provider Type="DataSource" Name="XmlProvider">
                <Parameter>/Xml/Streets.xml</Parameter>
                <Parameter>StreetTypes</Parameter>
                <Parameter>StreetType</Parameter>
            </Provider>
            <!--<Items>
                <Item Text="Please select" Value="" />
                <Item Text="Avenue" Value="Avenue" />
                <Item Text="Road" Value="Road" />
                <Item Text="Street" Value="Street" />
            </Items>-->
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please select a street type" Display="Dynamic"/>
        </Field>



        <Field Name="My file" Type="FileUpload" ValidExtensions="jpg,gif">
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please select a file to upload" Display="Dynamic"/>
        </Field>


        <Field Name="Favorite Genres" Type="CheckBoxList">
            <Provider Type="DataSource" Name="XmlProvider">
                <Parameter>/xml/Genres.xml</Parameter>
                <Parameter>Items</Parameter>
                <Parameter>Item</Parameter>

            </Provider>

            <!--<Items>
                <Item Text="Action" Value="Action" />
                <Item Text="Documentary" Value="Documentary" />
                <Item Text="Drama" Value="Drama" />
                <Item Text="Scifi" Value="Scifi" />
            </Items>-->
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please select a genre" Display="Dynamic"/>

            <!--<Validator Type="System.Web.UI.WebControls.RequiredFieldValidator, System.Web" Text="*" ErrorMessage="Please select a genre" Display="Dynamic"/>-->
        </Field>


        <Field Name="Date Of Birth" Type="DatePicker">
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please select your date of birth" Display="Dynamic"/>
        </Field>



        <Field Name="Password" Type="PasswordField">
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please select a password" Display="Dynamic"/>
        </Field>

        <Field Name="PasswordPair" Type="PasswordPair">
            <Validator Type="CompareValidator" Text="*" ErrorMessage="Passwords must definitely match" Display="Dynamic"/>
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please enter a password pair" Display="Dynamic"/>
        </Field>


        <Field Name="Comment" Type="TextArea">
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please enter a comment" Display="Dynamic"/>
        </Field>




    </FieldSet>



    <FieldSet>


        <Field Name="Terms and Conditions" Type="CheckBox">
            <Validator Type="RequiredFieldValidator" Text="*" ErrorMessage="Please agree to the terms and conditions" Display="Dynamic"/>
        </Field>


        <Field Name="Footer message" Type="Literal" Text="This is a random message in a Literal with a &lt;a href='http://www.google.com.au'&gt;link&lt;/a&gt;">
        </Field>

        
        <Field Name="Hidden Field 1" Type="HiddenField" Value="Test">
        </Field>



        <Field Name="My Custom Field " Type="CustomField">
            <Provider Type="CustomField" Name="StandardProvider">
                <Parameter>Param1</Parameter>
                <Parameter>Param2</Parameter>
                <Parameter>Param3</Parameter>

            </Provider>
        </Field>


    </FieldSet>
</Form>